<!DOCTYPE html>
<html lang="en">
<head>
    {% extends 'base.html' %}
    {% load static %}
    <!-- Bootstrap4 核心 CSS 文件 -->
    <link rel="stylesheet" href="{% static 'bootstrap/css/bootstrap.min.css' %}">
    <script src="{% static 'bootstrap/js/jquery-3.7.1.js' %}"></script>
    <!-- bootstrap.bundle.min.js 用于弹窗、提示、下拉菜单，包含了 popper.min.js -->
    <script src="{% static 'bootstrap/js/bootstrap.bundle.min.js' %}"></script>
    <!-- 最新的 Bootstrap4 核心 JavaScript 文件 -->
    <script src="{% static 'bootstrap/js/bootstrap.min.js' %}"></script>
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta charset="UTF-8">
</head>
<body class="container-fluid bg-light">
{% block content %}
    {% if user.is_authenticated %}
    	<p class="text-success">欢迎, {{ user.username }}!</p>
    	<hr><form action={% url 'accounts:logout' %} method="post">{% csrf_token %}
    		<input type="submit" value="注销">
    	</form>
    {% else %}
    	<a href="{% url 'accounts:login' %}">登录</a>
        <a href="{% url 'accounts:register' %}">没有账户?注册</a>
    {% endif %}
    <p class="text-danger">请先登录</p>
{% endblock %}
</body>
</html>